package mapper;

import bean.GoodsBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface IGoodsMapper {
    public int add(GoodsBean goodsBean);

    public void del(Integer id);

    public void update(@Param("id") Integer id, @Param("price") Integer price);

    public GoodsBean findById(Integer id);

    public List<GoodsBean> cutByItemList(@Param("start") int start, @Param("pageSize") int pageSize, @Param("name") String name,
                                           @Param("startPrice") Integer startPrice, @Param("endPrice") Integer endPrice);

    public int cutByItemCount(@Param("name") String name, @Param("startPrice") Integer startPrice, @Param("endPrice") Integer endPrice);

    public List<GoodsBean> cutByFactoryList(@Param("start") int start, @Param("pageSize") int pageSize, @Param("factory") String factory,
                                              @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    public int cutByFactoryCount(@Param("factory") String factory, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    public void addList(@Param("list") List<GoodsBean> list);

    public void delList(@Param("idArray") int[] idArray);
}
